package com.xh.bussiness.classinteractive.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xh.bussiness.classinteractive.bean.QueryClassInteractiveCommonRequest;
import com.xh.bussiness.classinteractive.model.ClassInteractiveCommonIcon;
import com.xh.bussiness.classinteractive.dao.ClassInteractiveCommonIconMapper;
import com.xh.bussiness.classinteractive.service.ClassInteractiveCommonIconService;
import com.xh.core.bean.XhPage;
import com.xh.core.service.impl.BaseServiceImpl;
import com.xh.core.util.StringUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 互动课堂点评图标(TsClassInteractiveCommonIcon)表服务实现类
 *
 * @author Pitt Cheung
 * @since 2021-07-09 14:12:35
 */
@Service
public class ClassInteractiveCommonIconServiceImpl extends BaseServiceImpl<ClassInteractiveCommonIconMapper, ClassInteractiveCommonIcon> implements ClassInteractiveCommonIconService {

    @Resource
    private ClassInteractiveCommonIconMapper classInteractiveCommonIconMapper;

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    @Override
    public ClassInteractiveCommonIcon queryById(String id) {
        return this.queryById(id);
    }

    /**
     * 新增数据
     *
     * @param classInteractiveCommonIcon 实例对象
     * @return 实例对象
     */
    @Override
    public boolean add(ClassInteractiveCommonIcon classInteractiveCommonIcon) {
       return this.insert(classInteractiveCommonIcon);
    }

    /**
     * 修改数据
     *
     * @param classInteractiveCommonIcon 实例对象
     * @return 实例对象
     */
    @Override
    public boolean modify(ClassInteractiveCommonIcon classInteractiveCommonIcon) {
        return this.update(classInteractiveCommonIcon);
    }

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    @Override
    public boolean deleteById(String id) {
        return this.classInteractiveCommonIconMapper.deleteById(id) > 0;
    }
}
